﻿// testapp.cpp
// 测试MyLib的输出函数，例如MyAdd, MyGetImage

#include <iostream>
#include "mylib.h"

int main()
{
    MyLibInit();

    int sum = MyAdd(80, 60);
    if (sum == 140)
    {
        std::cout << "MyAdd Success!\n";
    }
    else
    {
        std::cout << "MyAdd Failed!\n";
    }

    SAFEARRAY *arrRef = nullptr;
    bool success = MyGetImage(arrRef);
    if (success)
    {
        std::cout << "MyGetImage Success!\n";
    }
    else
    {
        std::cout << "MyGetImage Failed!\n";
    }

    success = MyGetResult(arrRef);
    if (success)
    {
        std::cout << "MyGetResult Success!\n";
    }
    else
    {
        std::cout << "MyGetResult Failed!\n";
    }

    MyLibFinit();

    return 0;
}
